<template>
	<view class="pages">
		<!-- 模块1 -->
		<view class="items">
			<view class="items_h">
				<view class="items_h_left fineFontSytle" style="width: 50%;">
					<!-- Policy Number -->
					{{$t('PoliciesDtalis.PolicyNumber')}}
				</view>
				<view class="items_h_right strongFontSytle" style="width: 50%;">
					{{dtailsData.number || ''}}
				</view>
			</view>
			<view class="items_h">
				<view class="items_h_left fineFontSytle" style="width: 50%;">
					<!-- Insured Name -->
					{{$t('PoliciesDtalis.InsuredName')}}
				</view>
				<view class="items_h_right strongFontSytle" style="width: 50%;">
					{{dtailsData.protect_user || ''}}
				</view>
			</view>
			<view class="items_h">
				<view class="items_h_left fineFontSytle" style="width: 50%;">
					<!-- Product Company -->
					{{$t('PoliciesDtalis.ProductCompany')}}
				</view>
				<view class="items_h_right strongFontSytle" style="width: 50%;">
					{{dtailsData.brand_name || ''}}
				</view>
			</view>
			<view class="items_h">
				<view class="items_h_left fineFontSytle" style="width: 50%;">
					<!-- Product Name -->
					{{$t('PoliciesDtalis.ProductName')}}
				</view>
				<view class="items_h_right strongFontSytle" style="width: 50%;">
					{{dtailsData.product.title || ''}}
				</view>
			</view>
			<view class="items_h">
				<view class="items_h_left fineFontSytle" style="width: 50%;">
					<!-- Face Amount -->
					{{$t('PoliciesDtalis.FaceAmount')}}
					
				</view>
				<view class="items_h_right strongFontSytle" style="width: 50%;">
					<!-- $500,000.00 -->
					${{ $formatNumberWithCommas(dtailsData.money) || '0.00'}}
					<!-- {{dtailsData.money ? `$${dtailsData.money}` : '$0.00'}} -->
				</view>
			</view>
			<view class="items_h">
				<view class="items_h_left fineFontSytle" style="width: 50%;">
					<!-- Effective Date -->
					{{$t('PoliciesDtalis.EffectiveDate')}}
					
				</view>
				<view class="items_h_right strongFontSytle" style="width: 50%;">
					{{dtailsData.deal_time  | formatter('yyyy-mm-dd')}}
				</view>
			</view>
			<view class="items_h">
				<view class="items_h_left fineFontSytle" style="width: 50%;">
					<!-- Policy Status -->
					{{$t('PoliciesDtalis.PolicyStatus')}}
				</view>
				<view class="items_h_right strongFontSytle" style="width: 50%;">
					<view class="Status">
						{{dtailsData.stu_name}}
					</view>
				</view>
			</view>
		</view>
		<!-- 模块2 -->

		<view class="items">
			<view class="modelTherr fineFontSytle">
				<!-- Commission Split Information -->
				{{$t('PoliciesDtalis.CommissionSplitInformation')}}
				
			</view>
			<view class="dataContent" v-for="(shareItems , index) in dtailsData.share_rate">
				<view class="line" >
					<!-- v-if="index != dtailsData.pay.length - 1" -->
					<!-- 线 -->
				</view>
				<view class="items_ch">
					<view class="items_ch_left " style="width: 50%;">
						<view class="items_ch_left_top fineFontSytle" >
							<!-- Agent Name -->
							{{$t('AddNewPolicy.AgentName')}}
						</view>
						<view class="items_ch_left_buttom strongFontSytle">
							<!-- Creative Atlas -->
							{{shareItems.create_name || ''}}
						</view>
					</view>
					<view class="items_ch_right" style="width: 50%;">
						<view class="items_ch_right_top fineFontSytle">
							<!-- Agent ID -->
							{{$t('AddNewPolicy.AgentID')}}
						</view>
						<view class="items_ch_right_buttom  strongFontSytle">
							<!-- EP -->
							{{shareItems.user_id || ''}}
						</view>
					</view>
				</view>
				<view class="items_ch">
					<view class="items_ch_left" style="width: 50%;">
						<view class="items_ch_left_top fineFontSytle" >
							<!-- Agent Level -->
							{{$t('AddNewPolicy.AgentLevel')}}
						</view>
						<view class="items_ch_left_buttom strongFontSytle">
							<!-- 4930.73 -->
							{{shareItems.create_level || ''}}
						</view>
					</view>
					<view class="items_ch_right" style="width: 50%;">
						<view class="items_ch_right_top fineFontSytle">
							<!-- Split Percentage -->
							{{$t('PoliciesDtalis.SplitPercentage')}}
						</view>
						<view class="items_ch_right_buttom strongFontSytle">
							<!-- First Year -->
							{{shareItems.share_rate ? `${shareItems.share_rate}%` : '0'}}
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 模块3 -->
		<view class="items">
			<view class="items_h">
				<view class="items_h_left fineFontSytle" style="width: 50%;">
					<!-- Create Person -->
					{{$t('PoliciesDtalis.CreatePerson')}}
				</view>
				<view class="items_h_right strongFontSytle" style="width: 50%;">
					{{dtailsData.create_name || ''}}
				</view>
			</view>
			<view class="items_h">
				<view class="items_h_left fineFontSytle" style="width: 50%;">
					<!-- Create Level -->
					{{$t('PoliciesDtalis.CreateLevel')}}
				</view>
				<view class="items_h_right strongFontSytle" style="width: 50%;">
					{{dtailsData.create_level || ''}}
				</view>
			</view>
			<view class="items_h">
				<view class="items_h_left fineFontSytle" style="width: 50%;">
				<!-- Create Time -->
				{{$t('PoliciesDtalis.CreateTime')}}
				</view>
				<view class="items_h_right strongFontSytle" style="width: 50%;">
					{{dtailsData.created_at  | formatter('yyyy-mm-dd')}}
				</view>
			</view>
		
		</view>
	</view>
</template>

<script>
	export default {

		data() {
			return {
				dtailsData:{}
			}
		},
		onLoad(options) {
			this.dtailsData = JSON.parse(options.data)
			console.log(this.dtailsData ,'数据来源于列表');
		},
		methods: {


		}
	}
</script>

<style>
	.pages {
		width: 100%;
		height: 100vh;
		overflow-y: auto;
		/* padding: 0 26rpx; */
		box-sizing: border-box;
		background-color: #F0F0F0;
		padding: 30rpx 25rpx 120rpx;
		box-sizing: border-box;
	}

	.items {
		overflow: auto;
		width: 100%;
		background-color: #fff;
		padding: 54rpx 32rpx 85rpx;
		box-sizing: border-box;
		margin-bottom: 20rpx;
		border-radius: 10rpx;
	}

	.items_h {
		display: flex;
		align-items: center;
		margin-top: 20rpx;
		/* background-color: red; */
	}

	.items_h:first-child {
		margin-top: 0rpx;
	}

	.items_h_left {}

	.strongFontSytle {
		font-family: Montserrat;
		font-size: 28rpx;
		font-weight: 700;
		letter-spacing: 0em;
		text-align: left;

	}

	.fineFontSytle {
		font-family: Montserrat;
		font-size: 28rpx;
		font-weight: 400;
		line-height: 22px;
		letter-spacing: 0em;
		text-align: left;

	}

	.Status {
		display: inline-block;
		height: 40rpx;
		line-height: 36rpx;
		background-color: #73E11D;
		padding: 0 20rpx;
		font-family: Inter;
		font-size: 24rpx;
		font-weight: 700;
		letter-spacing: 0em;
		text-align: center;
		color: #fff;
		border-radius: 20rpx;

	}

	.items_bh {
		display: flex;
		align-items: center;
		margin-top: 20rpx;

	}

	.items_bh:first-child {
		margin-top: 0;
	}

	.items_bh_list {
		width: 250rpx;
	}
	.items_ch {
		display: flex;
		align-items: center;
	}
	.items_ch_left_buttom,.items_ch_right_buttom {
		margin-top: 10rpx;
	}
	.items_ch {
		margin-top: 35rpx;
	}
	.items_ch:first-child {
		margin-top: 0;
	}
	.line {
		width: 100%;
		height: 2rpx;
		background-color: #808080;
		margin-top: 35rpx;
	}
	.modelTherr {
		width: 100%;
		margin-bottom: 35rpx;
	}
</style>